﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

// ReSharper disable CheckNamespace
namespace ini
// ReSharper restore CheckNamespace
{
	/// <summary>
	///     Represents a section in a InI File. A section consist of a dictionary filled with all
	///     entry's. The section does not know it's own name, it only holds the sections content.
	/// </summary>
	public class InISection :
		IEnumerable<KeyValuePair<string, string>>
	{
		/// <summary>
		///     If this Regex, the given string need to be placed between quotation marks, to
		///     prevent future parsing errors.
		/// </summary>
		private static readonly Regex regexValue = new Regex("(=|^[ \t]+|[ \t]+$)");

		/// <summary>
		///     If this Regex matches, the given string is NOT a valid key.
		/// </summary>
		private static readonly Regex regexKey = new Regex("([=\r\n]|^[ \t]+|[ \t]+$)");

		/// <summary>
		///     The dictionary for saving all the section's entry's.
		/// </summary>
		private readonly Dictionary<string, string> entries = new Dictionary<string, string>();

		#region interface IEnumerable<KeyValuePair<string, string>>

		/// <summary>
		///     Gets the enumerator.
		/// </summary>
		/// <returns></returns>
		public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
		{
			return entries.GetEnumerator();
		}

		/// <summary>
		///     Returns an enumerator that iterates through a collection.
		/// </summary>
		/// <returns>
		///     An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate
		///     through the collection.
		/// </returns>
		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}

		#endregion  interface IEnumerable<KeyValuePair<string, string>>

		#region io methods

		/// <summary>
		///     Adds the specified value connected to the given key to this section.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">
		///     An Invalid key causes an Exception. The exception is also raised if this section
		///     already contain's the key.
		/// </exception>
		/// <exception cref="System.ArgumentNullException">
		///     The key must not be empty. The value may be null, but not the key.
		/// </exception>
		public void Add(string key, string value)
		{
			if (key == null)
				throw new ArgumentNullException("The key must not be null or empty");

			if (!ValidateKey(key))
				throw new ArgumentException(String.Format("Key contains invalid characters or has the wrong format: \"{0}\"",
				                                          key));

			if (ContainsKey(key))
				throw new ArgumentException(String.Format("The section does already contain the entry {0}", key));

			entries.Add(key, value);
		}

		/// <summary>
		///     Adds the specified section to this instance.
		/// </summary>
		/// <param name="section">The section which will be added</param>
		/// <param name="replace">
		///     if set to <c>true</c> existing values will be overwriten; otherwise their values remain untouched.
		/// </param>
		/// <exception cref="System.ArgumentNullException">The keys and the section must not be empty. The values may be null, but not the key and not the section.</exception>
		public void Add(IEnumerable<KeyValuePair<string, string>> section, bool replace = true)
		{
			if (section == null)
				throw new ArgumentNullException("The section must not be empty");

			if (replace)
			{
				foreach (var pair in section)
				{
					if (ContainsKey(pair.Key))
					{
						Add(pair.Key, pair.Value);
					}
					else
					{
						Set(pair.Key, pair.Value);
					}
				}
			}
			else
			{
				foreach (var pair in section)
				{
					if (!ContainsKey(pair.Key))
					{
						Add(pair.Key, pair.Value);
					}
				}
			}
		}

		/// <summary>
		///     Changes value connected to the given key in this section.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void Set(string key, string value)
// ReSharper restore MemberCanBePrivate.Global
		{
			if (key == null)
				throw new ArgumentNullException("The key must not be null or empty");

			if (!ContainsKey(key))
				throw new KeyNotFoundException(String.Format("The section does not contain the entry {0}", key));

			entries[key] = value;
		}

		/// <summary>
		///     Returns the value connected to the given key in this section.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public string Get(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			if (String.IsNullOrEmpty(key))
				throw new ArgumentNullException("The key must not be null or empty");

			if (!ContainsKey(key))
				throw new KeyNotFoundException(String.Format("The section does not contain the entry {0}", key));

			return entries[key];
		}

		/// <summary>
		///     Tries to get the value connected to the given key.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The value connected to the given key if the key does exist. Otherwise the strings defualt value</param>
		/// <returns>true if the section contains an element with the specified key; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public bool TryGet(string key, out string value)
// ReSharper restore UnusedMember.Global
		{
			value = String.Empty;
			return !String.IsNullOrWhiteSpace(key) && entries.TryGetValue(key, out value);
		}

		/// <summary>
		///     Removes the specified key and the value associated to the key. This will also remove all comments, connected to this value.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <returns>True it the entry was succesfully removed otherwise false</returns>
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedMethodReturnValue.Global
		public bool Remove(string key)
// ReSharper restore UnusedMethodReturnValue.Global
// ReSharper restore MemberCanBePrivate.Global
// ReSharper restore UnusedMember.Global
		{
			return !String.IsNullOrWhiteSpace(key) && entries.Remove(key);
		}

		/// <summary>
		///     Determines whether this section contains the specified key.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <returns>
		///     <c>true</c> if this section contains the specified key; otherwise, <c>false</c>.
		/// </returns>
		public bool ContainsKey(string key)
		{
			if (String.IsNullOrWhiteSpace(key))
				return false;

			return entries.ContainsKey(key);
		}

		/// <summary>
		/// Returns true if the given key has a valid format. Before adding a new entry, every key
		/// has to pass this validation.
		/// </summary>
		/// <param name="key">The key.</param>
		/// <returns>true if the given key has a valid format; otherwise false</returns>
// ReSharper disable MemberCanBePrivate.Global
		public static bool ValidateKey(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			return key != null && !regexKey.IsMatch(key);
		}

		/// <summary>
		/// Renames the specified entry.
		/// </summary>
		/// <param name="key">The key.</param>
		/// <param name="newKey">The new key.</param>
		/// <exception cref="System.ArgumentException">
		///     An Invalid key causes an Exception. The exception is also raised if this section
		///     does not contain the key.
		/// </exception>
		/// <exception cref="System.ArgumentNullException">
		///     The key must not be empty. The value may be null, but not the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void Rename(string key, string newKey)
// ReSharper restore UnusedMember.Global
		{
			if (newKey == null)
				throw new ArgumentNullException("The key must not be null or empty");

			if (!ValidateKey(newKey))
				throw new ArgumentException(String.Format("Key contains invalid characters or has the wrong format: \"{0}\"",
														  key));

			if (!ContainsKey(key))
				throw new ArgumentException(String.Format("The section does not contain the entry {0}", key));

			string tmp = Get(key);
			Remove(key);
			Add(newKey, tmp);
		}

		/// <summary>
		/// Clears this instance.
		/// </summary>
// ReSharper disable UnusedMember.Global
		public void Clear()
// ReSharper restore UnusedMember.Global
		{
			entries.Clear();	
		}

		#endregion io methods

		#region equality member

		/// <summary>
		///     Determines whether the specified <see cref="System.Object" /> is equal to this instance.
		/// </summary>
		/// <param name="obj">
		///     The <see cref="System.Object" /> to compare with this instance.
		/// </param>
		/// <returns>
		///     <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.
		/// </returns>
		public override bool Equals(object obj)
		{
			if (obj == null || obj.GetType() != typeof (InISection))
				return false;

			InISection section = (InISection) obj;

			if (section.Values.Count != Values.Count ||
			    section.Keys.Count != Keys.Count)
				return false;

			return this.All(pair => pair.Value.Equals(section[pair.Key]));
		}

		/// <summary>
		///     Equalses the specified other.
		/// </summary>
		/// <param name="other">The other.</param>
		/// <returns></returns>
		public bool Equals(InISection other)
		{
			return Equals(entries, other.entries);
		}

		/// <summary>
		///     Returns a hash code for this instance.
		/// </summary>
		/// <returns>
		///     A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
		/// </returns>
		public override int GetHashCode()
		{
			return (entries != null ? entries.GetHashCode() : 0);
		}

		/// <summary>
		///     Returns a <see cref="System.String" /> that represents this instance.
		/// </summary>
		/// <returns>
		///     A <see cref="System.String" /> that represents this instance.
		/// </returns>
		public override string ToString()
		{
			StringBuilder builder = new StringBuilder();
			foreach (var pair in this)
			{
				builder.Append(pair.Key);
				builder.Append("=");
				builder.Append(Escape(pair.Value, pair.Key.Length + 1));
				builder.Append("\n");
			}

			return builder.ToString();
		}

		#endregion equality member

		#region helper

		/// <summary>
		///     Escapes the specified value.
		/// </summary>
		/// <param name="value">The value which will be escaped.</param>
		/// <param name="indent">The indent.</param>
		/// <returns></returns>
		private static string Escape(string value, int indent)
		{
			string indentStr = new string(' ', indent);

			if (!String.IsNullOrWhiteSpace(value))
			{
				var lines = value.Split('\n');
				for (var i = 0; i < lines.Length; i++)
				{
					if (regexValue.IsMatch(lines[i]))
					{
						lines[i] = "\"" + lines[i] + "\"";
					}
					if (i > 0)
					{
						lines[i] = lines[i].Insert(0, indentStr);
					}
				}

				return String.Join("\n", lines);
			}

			return String.Empty;
		}

		#endregion helper

		#region public properties

		/// <summary>
		///     Gets or sets the <see cref="System.String" /> with the specified key. While accessing
		///     the setter, not existing key's will create a new entry in the ini file. But accessing the
		///     getter, a not existing key will cause a System.Argument exception.
		/// </summary>
		/// <value>
		///     The <see cref="System.String" />. value associated to the specified key.
		/// </value>
		/// <param name="key">The key wich is associated with a value.</param>
		/// <returns>The value associated to the specified key</returns>
		/// <exception cref="System.ArgumentException">Is thrown, while accessing the getter with a non existant key.</exception>
		public string this[string key]
		{
			get { return Get(key); }
			set
			{
				if (ContainsKey(key))
				{
					Set(key, value);
				}
				else
				{
					Add(key, value);
				}
			}
		}

		/// <summary>
		///     Gets the value collection.
		/// </summary>
		/// <value>
		///     The value collection
		/// </value>
// ReSharper disable MemberCanBePrivate.Global
		public Dictionary<string, string>.ValueCollection Values { get { return entries.Values; } }

// ReSharper restore MemberCanBePrivate.Global

		/// <summary>
		///     Gets the key collection.
		/// </summary>
		/// <value>
		///     The key collection.
		/// </value>
// ReSharper disable MemberCanBePrivate.Global
		public Dictionary<string, string>.KeyCollection Keys { get { return entries.Keys; } }

// ReSharper restore MemberCanBePrivate.Global

		#endregion public properties

		#region typesafe 

		#region typesafe getter 

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the value to a boolean.
		///     Converts the specified string representation of a logical value to its System.Boolean equivalent, or throws
		///     an exception if the string is not equivalent to the value of System.Boolean.TrueString or System.Boolean.FalseString.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="ArgumentNullException">value is null</exception>
		/// <exception cref="FormatException">value is not equivalent to the value of the System.Boolean.TrueString or System.Boolean.FalseString field.</exception>
		/// <returns>true if value is equivalent to the value of the System.Boolean.TrueString field; false if value is equivalent to the value of the System.Boolean.FalseString field.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean GetAsBoolean(string key)
// ReSharper restore UnusedMember.Global
		{
			return Boolean.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the value to a byte. A byte value that is equivalent to the number contained in string value.
		///     The string is interpreted using the System.Globalization.NumberStyles.Integer style.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">value represents a number less than System.Byte.MinValue or greater than System.Byte.MaxValue.</exception>
		/// <returns>A byte value that is equivalent to the number contained in the value.</returns>
// ReSharper disable UnusedMember.Global
		public Byte GetAsByte(string key)
// ReSharper restore UnusedMember.Global
		{
			return Byte.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the value to a signed byte. A signed byte value that is equivalent to the number contained in string value.
		///     The string is interpreted using the System.Globalization.NumberStyles.Integer style.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">value represents a number less than System.SByte.MinValue or greater than System.SByte.MaxValue.</exception>
		/// <returns>An 8-bit signed integer that is equivalent to the number contained in the value.</returns>
// ReSharper disable UnusedMember.Global
		public SByte GetAsSByte(string key)
// ReSharper restore UnusedMember.Global
		{
			return SByte.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the value to a char.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">The length is not 1</exception>
		/// <returns>A Unicode character equivalent to the sole character in the value.</returns>
// ReSharper disable UnusedMember.Global
		public Char GetAsChar(string key)
// ReSharper restore UnusedMember.Global
		{
			return Char.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the value to a decimal.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Decimal.MinValue or greater than System.Decimal.MaxValue.
		/// </exception>
		/// <returns>The equivalent to the number contained in the value.</returns>
// ReSharper disable UnusedMember.Global
		public Decimal GetAsDecimal(string key)
// ReSharper restore UnusedMember.Global
		{
			return Decimal.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the value representation of a
		///     number to its double-precision floating-point number equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number that is less than System.Double.MinValue or greater than System.Double.MaxValue.
		/// </exception>
		/// <returns>A double-precision floating-point number that is equivalent to the numeric value or symbol specified in the value.</returns>
// ReSharper disable UnusedMember.Global
		public Double GetAsDouble(string key)
// ReSharper restore UnusedMember.Global
		{
			return Double.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its single-precision floating-point number equivalent..
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     represents a number less than System.Single.MinValue or greater than System.Single.MaxValue.
		/// </exception>
		/// <returns>A single-precision floating-point number equivalent to the numeric value or symbol specified in the value.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Single GetAsSingle(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			return Single.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 16-bit signed integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int16.MinValue or greater than System.Int16.MaxValue.
		/// </exception>
		/// <returns>A 16-bit signed integer equivalent to the number contained in the value.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Int16 GetAsInt16(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			return Int16.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. CConverts the string representation of a number to its 16-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.UInt16.MinValue or greater than System.UInt16.MaxValue.
		/// </exception>
		/// <returns>A 16-bit unsigned integer equivalent to the number contained in the value.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public UInt16 GetAsUInt16(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			return UInt16.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 32-bit signed integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int32.MinValue or greater than System.Int32.MaxValue.
		/// </exception>
		/// <returns>A 32-bit signed integer equivalent to the number contained in the value.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Int32 GetAsInt32(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			return Int32.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 32-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number that is less than System.UInt32.MinValue or greater than System.UInt32.MaxValue
		/// </exception>
		/// <returns>A 32-bit unsigned integer equivalent to the number contained in the value.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public UInt32 GetAsUInt32(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			return UInt32.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 64-bit signed integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int64.MinValue or greater than System.Int64.MaxValue
		/// </exception>
		/// <returns>A 64-bit signed integer equivalent to the number contained in the value.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Int64 GetAsInt64(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			return Int64.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 64-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.UInt64.MinValue or greater than System.UInt64.MaxValue.
		/// </exception>
		/// <returns>A 64-bit unsigned integer equivalent to the number contained in the value.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public UInt64 GetAsUInt64(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			return UInt64.Parse(Get(key));
		}

		/// <summary>
		///     Returns the value connected to the given key in this section.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
// ReSharper disable UnusedMember.Global
		public string GetAsString(string key)
// ReSharper restore UnusedMember.Global
		{
			return Get(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section.Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <typeparam name="T">The Enum's type</typeparam>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="ArgumentException">
		///     enumType is not an System.Enum.-or- value is either an empty string or only contains white space.-or- value is a name, but not one of the named constants defined for the enumeration
		/// </exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value is outside the range of the underlying type of enumType
		/// </exception>
		/// <returns>An object of type enumType whose value is represented by value</returns>
// ReSharper disable UnusedMember.Global
		public T GetAsEnum<T>(string key) where T : struct
// ReSharper restore UnusedMember.Global
		{
			if (!typeof (T).IsEnum)
				throw new ArgumentException(String.Format("Type {0} must be an enumerated type!", typeof (T).Name));

			return (T) Enum.Parse(typeof (T), Get(key));
		}

		#region alternative names

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its single-precision floating-point number equivalent..
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     represents a number less than System.Single.MinValue or greater than System.Single.MaxValue.
		/// </exception>
		/// <returns>A single-precision floating-point number equivalent to the numeric value or symbol specified in the value.</returns>
// ReSharper disable UnusedMember.Global
		public Single GetAsFloat(string key)
// ReSharper restore UnusedMember.Global
		{
			return GetAsSingle(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 16-bit signed integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int16.MinValue or greater than System.Int16.MaxValue.
		/// </exception>
		/// <returns>A 16-bit signed integer equivalent to the number contained in the value.</returns>
// ReSharper disable UnusedMember.Global
		public Int16 GetAsShort(string key)
// ReSharper restore UnusedMember.Global
		{
			return GetAsInt16(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. CConverts the string representation of a number to its 16-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.UInt16.MinValue or greater than System.UInt16.MaxValue.
		/// </exception>
		/// <returns>A 16-bit unsigned integer equivalent to the number contained in the value.</returns>
// ReSharper disable UnusedMember.Global
		public UInt16 GetAsUShort(string key)
// ReSharper restore UnusedMember.Global
		{
			return GetAsUInt16(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 32-bit signed integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int32.MinValue or greater than System.Int32.MaxValue.
		/// </exception>
		/// <returns>A 32-bit signed integer equivalent to the number contained in the value.</returns>
// ReSharper disable UnusedMember.Global
		public Int32 GetAsInt(string key)
// ReSharper restore UnusedMember.Global
		{
			return GetAsInt32(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 32-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number that is less than System.UInt32.MinValue or greater than System.UInt32.MaxValue
		/// </exception>
		/// <returns>A 32-bit unsigned integer equivalent to the number contained in the value.</returns>
// ReSharper disable UnusedMember.Global
		public UInt32 GetAsUInt(string key)
// ReSharper restore UnusedMember.Global
		{
			return GetAsUInt32(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 64-bit signed integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int64.MinValue or greater than System.Int64.MaxValue
		/// </exception>
		/// <returns>A 64-bit signed integer equivalent to the number contained in the value.</returns>
// ReSharper disable UnusedMember.Global
		public Int64 GetAsLong(string key)
// ReSharper restore UnusedMember.Global
		{
			return GetAsInt64(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Converts the string representation of a number to its 64-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.UInt64.MinValue or greater than System.UInt64.MaxValue.
		/// </exception>
		/// <returns>A 64-bit unsigned integer equivalent to the number contained in the value.</returns>
// ReSharper disable UnusedMember.Global
		public UInt64 GetAsULong(string key)
// ReSharper restore UnusedMember.Global
		{
			return GetAsUInt64(key);
		}

		#endregion alternative names

		#endregion typesafe setter / getter 

		#region typesafe exceptionless getter

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of a logical value to its System.Boolean equivalent. A return value indicates whether the conversion succeeded or failed.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">When this method returns, if the conversion succeeded, contains true if value is equivalent to System.Boolean.TrueString or false if value is equivalent to System.Boolean.FalseString. If the conversion failed, contains false. The conversion fails if value is null or is not equivalent to the value of either the System.Boolean.TrueString or System.Boolean.FalseString field.</param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsBoolean(String key, out Boolean var)
// ReSharper restore UnusedMember.Global
		{
			var = default(Boolean);
			return ContainsKey(key) && ContainsKey(key) && Boolean.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of a number to its System.Byte equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">When this method returns, contains the System.Byte value equivalent to the number contained in the value if the conversion succeeded, or zero if the conversion failed. This parameter is passed uninitialized</param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsByte(String key, out Byte var)
// ReSharper restore UnusedMember.Global
		{
			var = default(Byte);
			return ContainsKey(key) && Byte.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of a number to its System.SByte equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">When this method returns, contains the System.SByte value equivalent to the number contained in the value if the conversion succeeded, or zero if the conversion failed. This parameter is passed uninitialized</param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsSByte(String key, out SByte var)
// ReSharper restore UnusedMember.Global
		{
			var = default(SByte);
			return ContainsKey(key) && SByte.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Byte equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.Char value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsChar(String key, out Char var)
// ReSharper restore UnusedMember.Global
		{
			var = default(Char);
			return ContainsKey(key) && Char.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Decimal equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.Decimal value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsDecimal(String key, out Decimal var)
// ReSharper restore UnusedMember.Global
		{
			var = default(Decimal);
			return ContainsKey(key) && Decimal.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Double equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.Double value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsDouble(String key, out Double var)
// ReSharper restore UnusedMember.Global
		{
			var = default(Double);
			return ContainsKey(key) && Double.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Single equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.Single value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Boolean TryGetAsSingle(String key, out Single var)
// ReSharper restore MemberCanBePrivate.Global
		{
			var = default(Single);
			return ContainsKey(key) && Single.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Int16 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.Int16 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Boolean TryGetAsInt16(String key, out Int16 var)
// ReSharper restore MemberCanBePrivate.Global
		{
			var = default(Int16);
			return ContainsKey(key) && Int16.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.UInt16 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.UInt16 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Boolean TryGetAsUInt16(String key, out UInt16 var)
// ReSharper restore MemberCanBePrivate.Global
		{
			var = default(UInt16);
			return ContainsKey(key) && UInt16.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Int32 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.UInt32 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
		public Boolean TryGetAsInt32(String key, out Int32 var)
// ReSharper restore MemberCanBePrivate.Global
// ReSharper restore UnusedMember.Global
		{
			var = default(Int32);
			return ContainsKey(key) && Int32.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.UInt32 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.UInt32 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Boolean TryGetAsUInt32(String key, out UInt32 var)
// ReSharper restore MemberCanBePrivate.Global
		{
			var = default(UInt32);
			return ContainsKey(key) && UInt32.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Int64 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.Int64 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Boolean TryGetAsInt64(String key, out Int64 var)
// ReSharper restore MemberCanBePrivate.Global
		{
			var = default(Int64);
			return ContainsKey(key) && Int64.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.UInt64 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.UInt64 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable MemberCanBePrivate.Global
		public Boolean TryGetAsUInt64(String key, out UInt64 var)
// ReSharper restore MemberCanBePrivate.Global
		{
			var = default(UInt64);
			return ContainsKey(key) && UInt64.TryParse(Get(key), out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its Enum equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <typeparam name="T">The Enum's type</typeparam>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="val">
		///     When this method returns, contains the enum's value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public bool TryGetAsEnum<T>(string key, out T val) where T : struct
// ReSharper restore UnusedMember.Global
		{
			val = default(T);

			if (!typeof (T).IsEnum)
				return false;

// ReSharper disable RedundantTypeArgumentsOfMethod
			return Enum.TryParse<T>(key, out val);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		#region alternative names

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Single equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.Single value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsFloat(String key, out Single var)
// ReSharper restore UnusedMember.Global
		{
			return TryGetAsSingle(key, out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Int16 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.Int16 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsShort(String key, out Int16 var)
// ReSharper restore UnusedMember.Global
		{
			return TryGetAsInt16(key, out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.UInt16 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.UInt16 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsUShort(String key, out UInt16 var)
// ReSharper restore UnusedMember.Global
		{
			return TryGetAsUInt16(key, out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Int32 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.UInt32 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsInt(String key, out Int32 var)
// ReSharper restore UnusedMember.Global
		{
			return TryGetAsInt32(key, out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.UInt32 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.UInt32 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsUInt(String key, out UInt32 var)
// ReSharper restore UnusedMember.Global
		{
			return TryGetAsUInt32(key, out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.Int64 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.Int64 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsLong(string key, out Int64 var)
// ReSharper restore UnusedMember.Global
		{
			return TryGetAsInt64(key, out var);
		}

		/// <summary>
		///     Returns the value connected to the given key in this section. Tries to convert the value representation of
		///     a number to its System.UInt64 equivalent, and returns a value that indicates whether the conversion succeeded.
		/// </summary>
		/// <param name="key">The key associated with the value.</param>
		/// <param name="var">
		///     When this method returns, contains the System.UInt64 value equivalent to the number contained
		///     in s if the conversion succeeded, or zero if the conversion failed. This parameter is passed
		///     uninitialized
		/// </param>
		/// <returns>true if value was converted successfully; otherwise, false.</returns>
// ReSharper disable UnusedMember.Global
		public Boolean TryGetAsULong(string key, out UInt64 var)
// ReSharper restore UnusedMember.Global
		{
			return TryGetAsUInt64(key, out var);
		}

		#endregion alternative names

		#endregion typesafe exceptionless getter

		#region setter

		#region add

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call reduces unwanted errors,
		///     with implicite type conversion. It is safer to use the typesafe functions.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAs<T>(string key, T value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable CompareNonConstrainedGenericWithNull
			if (value == null)
// ReSharper restore CompareNonConstrainedGenericWithNull
				throw new ArgumentNullException("The value must not be null");

			Add(key, value.ToString());
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Boolean reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsBoolean(string key, Boolean value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Boolean>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Byte reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsByte(string key, Byte value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Byte>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.SByte reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsSByte(string key, SByte value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<SByte>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Char reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsChar(string key, Char value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Char>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Decimal reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsDecimal(string key, Decimal value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Decimal>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Double reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsDouble(string key, Double value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Double>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Single reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsSingle(string key, Single value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Single>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Int16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsInt16(string key, Int16 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Int16>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.UInt16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsUInt16(string key, UInt16 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<UInt16>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Int32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsInt32(string key, Int32 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Int32>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.UInt32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsUInt32(string key, UInt32 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<UInt32>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Int64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsInt64(string key, Int64 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Int64>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.UInt64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsUInt64(string key, UInt64 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<UInt64>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		#region alternate names

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Single reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsFloat(string key, Single value)
// ReSharper restore UnusedMember.Global
		{
			AddAsSingle(key, value);
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Int16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsShort(string key, Int16 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsInt16(key, value);
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.UInt16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsUShort(string key, UInt16 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsUInt16(key, value);
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Int32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsInt(string key, Int32 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsInt32(key, value);
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.UInt32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsUInt(string key, UInt32 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsUInt32(key, value);
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.Int64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsLong(string key, Int64 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsInt64(key, value);
		}

		/// <summary>
		///     Adds the specified value connected to the given key to this section. Typesafe function call for the
		///     type System.UInt64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentException">An Invalid key causes an Exception. The exception is also raised if this section already contain's the key.</exception>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsULong(string key, UInt64 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsUInt64(key, value);
		}

		#endregion alternative names

		#endregion add

		#region set

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call
		///     reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.ArgumentNullException">Due to the ToString() call, the value must not be null.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void SetAs<T>(string key, T value)
// ReSharper restore MemberCanBePrivate.Global
		{
			// ReSharper disable CompareNonConstrainedGenericWithNull
			if (value == null)
				// ReSharper restore CompareNonConstrainedGenericWithNull
				throw new ArgumentNullException("The value must not be null");

			Set(key, value.ToString());
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Boolean reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsBoolean(string key, Boolean value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Boolean>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Byte reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsByte(string key, Byte value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Byte>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.SByte reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsSByte(string key, SByte value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<SByte>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Char reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsChar(string key, Char value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Char>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Decimal reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsDecimal(string key, Decimal value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Decimal>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Double reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsDouble(string key, Double value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Double>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Single reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable MemberCanBePrivate.Global
		public void SetAsSingle(string key, Single value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Single>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable MemberCanBePrivate.Global
		public void SetAsInt16(string key, Int16 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Int16>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes UInt16 connected to the given key in this section. Typesafe function call for the
		///     type System.Boolean reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable MemberCanBePrivate.Global
		public void SetAsUInt16(string key, UInt16 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<UInt16>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable MemberCanBePrivate.Global
		public void SetAsInt32(string key, Int32 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Int32>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.UInt32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable MemberCanBePrivate.Global
		public void SetAsUInt32(string key, UInt32 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<UInt32>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable MemberCanBePrivate.Global
		public void SetAsInt64(string key, Int64 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Int64>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.UInt64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable MemberCanBePrivate.Global
		public void SetAsUInt64(string key, UInt64 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<UInt64>(key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		#region alternate names

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Single reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsFloat(string key, Single value)
// ReSharper restore UnusedMember.Global
		{
			SetAsSingle(key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsShort(string key, Int16 value)
// ReSharper restore UnusedMember.Global
		{
			SetAsInt16(key, value);
		}

		/// <summary>
		///     Changes UInt16 connected to the given key in this section. Typesafe function call for the
		///     type System.Boolean reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsUShort(string key, UInt16 value)
// ReSharper restore UnusedMember.Global
		{
			SetAsUInt16(key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsInt(string key, Int32 value)
// ReSharper restore UnusedMember.Global
		{
			SetAsInt32(key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.UInt32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsUInt(string key, UInt32 value)
// ReSharper restore UnusedMember.Global
		{
			SetAsUInt32(key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsLong(string key, Int64 value)
// ReSharper restore UnusedMember.Global
		{
			SetAsInt64(key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.UInt64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void SetAsULong(string key, UInt64 value)
// ReSharper restore UnusedMember.Global
		{
			SetAsUInt64(key, value);
		}

		#endregion alternative names

		#endregion set

		#endregion setter

		#endregion typesafe
	}
}